package jp.ac.u_tokyo.dch.core.db;

import java.io.InputStream;
import java.io.Reader;
import java.math.BigDecimal;
import java.net.URL;
import java.sql.Array;
import java.sql.Blob;
import java.sql.CallableStatement;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.Date;
import java.sql.ParameterMetaData;
import java.sql.Ref;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.Calendar;
import java.util.Map;

import jp.ac.u_tokyo.dch.core.exceptions.DBException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * CallableStatement ラッパークラス
 *
 * @version 1.1
 */
public class CustomCallableStatement {

	/** ロガー */
	private static Log logger = LogFactory.getLog(CustomCallableStatement.class);

	/** CallableStatement */
	private CallableStatement stmt = null;

	/**
	 * コンストラクタ
	 * @param stmt CallableStatement
	 */
	public CustomCallableStatement(CallableStatement stmt) {

		this.stmt = stmt;
	}

	public Array getArray(int i) throws DBException {
		try {
			return this.stmt.getArray(i);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Array getArray(String parameterName) throws DBException {
		try {
			return this.stmt.getArray(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public BigDecimal getBigDecimal(int parameterIndex) throws DBException {
		try {
			return this.stmt.getBigDecimal(parameterIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public BigDecimal getBigDecimal(String parameterName) throws DBException {
		try {
			return this.stmt.getBigDecimal(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	@SuppressWarnings("deprecation")
	public BigDecimal getBigDecimal(int parameterIndex, int scale) throws DBException {
		try {
			return this.stmt.getBigDecimal(parameterIndex, scale);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Blob getBlob(int i) throws DBException {
			try {
				return this.stmt.getBlob(i);
			} catch ( SQLException e ) {
				logger.error("ERROR",e);
				throw new DBException();
			}
	}

	public Blob getBlob(String parameterName) throws DBException {
			try {
				return this.stmt.getBlob(parameterName);
			} catch ( SQLException e ) {
				logger.error("ERROR",e);
				throw new DBException();
			}
	}

	public boolean getBoolean(int parameterIndex) throws DBException {
			try {
				return this.stmt.getBoolean(parameterIndex);
			} catch ( SQLException e ) {
				logger.error("ERROR",e);
				throw new DBException();
			}
	}

	public boolean getBoolean(String parameterName) throws DBException {
		try {
			return this.stmt.getBoolean(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public byte getByte(int parameterIndex) throws DBException {
		try {
			return this.stmt.getByte(parameterIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public byte getByte(String parameterName) throws DBException {
		try {
			return this.stmt.getByte(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public byte[] getBytes(int parameterIndex) throws DBException {
		try {
			return this.stmt.getBytes(parameterIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public byte[] getBytes(String parameterName) throws DBException {
		try {
			return this.stmt.getBytes(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Clob getClob(int i) throws DBException {
		try {
			return this.stmt.getClob(i);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Clob getClob(String parameterName) throws DBException {
		try {
			return this.stmt.getClob(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Date getDate(int parameterIndex) throws DBException {
		try {
			return this.stmt.getDate(parameterIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Date getDate(String parameterName) throws DBException {
		try {
			return this.stmt.getDate(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Date getDate(int parameterIndex, Calendar cal) throws DBException {
		try {
			return this.stmt.getDate(parameterIndex, cal);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Date getDate(String parameterName, Calendar cal) throws DBException {
		try {
			return this.stmt.getDate(parameterName, cal);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public double getDouble(int parameterIndex) throws DBException {
		try {
			return this.stmt.getDouble(parameterIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public double getDouble(String parameterName) throws DBException {
		try {
			return this.stmt.getDouble(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public float getFloat(int parameterIndex) throws DBException {
		try {
			return this.stmt.getFloat(parameterIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public float getFloat(String parameterName) throws DBException {
		try {
			return this.stmt.getFloat(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getInt(int parameterIndex) throws DBException {
		try {
			return this.stmt.getInt(parameterIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getInt(String parameterName) throws DBException {
		try {
			return this.stmt.getInt(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public long getLong(int parameterIndex) throws DBException {
		try {
			return this.stmt.getLong(parameterIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public long getLong(String parameterName) throws DBException {
		try {
			return this.stmt.getLong(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Object getObject(int parameterIndex) throws DBException {
		try {
			return this.stmt.getObject(parameterIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Object getObject(String parameterName) throws DBException {
		try {
			return this.stmt.getObject(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Object getObject(int i, Map<String, Class<?>> map)
			throws DBException {
		try {
			return this.stmt.getObject(i, map);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Object getObject(String parameterName, Map<String, Class<?>> map)
			throws DBException {
		try {
			return this.stmt.getObject(parameterName, map);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Ref getRef(int i) throws DBException {
		try {
			return this.stmt.getRef(i);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Ref getRef(String parameterName) throws DBException {
		try {
			return this.stmt.getRef(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public short getShort(int parameterIndex) throws DBException {
		try {
			return this.stmt.getShort(parameterIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public short getShort(String parameterName) throws DBException {
		try {
			return this.stmt.getShort(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public String getString(int parameterIndex) throws DBException {
		try {
			return this.stmt.getString(parameterIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public String getString(String parameterName) throws DBException {
		try {
			return this.stmt.getString(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Time getTime(int parameterIndex) throws DBException {
		try {
			return this.stmt.getTime(parameterIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Time getTime(String parameterName) throws DBException {
		try {
			return this.stmt.getTime(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Time getTime(int parameterIndex, Calendar cal) throws DBException {
		try {
			return this.stmt.getTime(parameterIndex, cal);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Time getTime(String parameterName, Calendar cal) throws DBException {
		try {
			return this.stmt.getTime(parameterName, cal);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Timestamp getTimestamp(int parameterIndex) throws DBException {
		try {
			return this.stmt.getTimestamp(parameterIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Timestamp getTimestamp(String parameterName) throws DBException {
		try {
			return this.stmt.getTimestamp(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Timestamp getTimestamp(int parameterIndex, Calendar cal)
			throws DBException {
		try {
			return this.stmt.getTimestamp(parameterIndex, cal);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Timestamp getTimestamp(String parameterName, Calendar cal)
			throws DBException {
		try {
			return this.stmt.getTimestamp(parameterName, cal);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public URL getURL(int parameterIndex) throws DBException {
		try {
			return this.stmt.getURL(parameterIndex);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public URL getURL(String parameterName) throws DBException {
		try {
			return this.stmt.getURL(parameterName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void registerOutParameter(int parameterIndex, int sqlType)
			throws DBException {
		try {
			this.stmt.registerOutParameter(parameterIndex, sqlType);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void registerOutParameter(String parameterName, int sqlType)
			throws DBException {
		try {
			this.stmt.registerOutParameter(parameterName, sqlType);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void registerOutParameter(int parameterIndex, int sqlType, int scale)
			throws DBException {
		try {
			this.stmt.registerOutParameter(parameterIndex, sqlType, scale);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void registerOutParameter(int paramIndex, int sqlType,
			String typeName) throws DBException {
		try {
			this.stmt.registerOutParameter(paramIndex, sqlType, typeName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void registerOutParameter(String parameterName, int sqlType,
			int scale) throws DBException {
		try {
			this.stmt.registerOutParameter(parameterName, sqlType, scale);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void registerOutParameter(String parameterName, int sqlType,
			String typeName) throws DBException {
		try {
			this.stmt.registerOutParameter(parameterName, sqlType, typeName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setAsciiStream(String parameterName, InputStream x, int length)
			throws DBException {
		try {
			this.stmt.setAsciiStream(parameterName, x, length);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setBigDecimal(String parameterName, BigDecimal x)
			throws DBException {
		try {
			this.stmt.setBigDecimal(parameterName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setBinaryStream(String parameterName, InputStream x, int length)
			throws DBException {
		try {
			this.stmt.setBinaryStream(parameterName, x, length);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setBoolean(String parameterName, boolean x) throws DBException {
		try {
			this.stmt.setBoolean(parameterName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setByte(String parameterName, byte x) throws DBException {
		try {
			this.stmt.setByte(parameterName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setBytes(String parameterName, byte[] x) throws DBException {
		try {
			this.stmt.setBytes(parameterName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setCharacterStream(String parameterName, Reader reader,
			int length) throws DBException {
		try {
			this.stmt.setCharacterStream(parameterName, reader, length);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setDate(String parameterName, Date x) throws DBException {
		try {
			this.stmt.setDate(parameterName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setDate(String parameterName, Date x, Calendar cal)
			throws DBException {
		try {
			this.stmt.setDate(parameterName, x, cal);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setDouble(String parameterName, double x) throws DBException {
		try {
			this.stmt.setDouble(parameterName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setFloat(String parameterName, float x) throws DBException {
		try {
			this.stmt.setFloat(parameterName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setInt(String parameterName, int x) throws DBException {
		try {
			this.stmt.setInt(parameterName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setLong(String parameterName, long x) throws DBException {
		try {
			this.stmt.setLong(parameterName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setNull(String parameterName, int sqlType) throws DBException {
		try {
			this.stmt.setNull(parameterName, sqlType);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setNull(String parameterName, int sqlType, String typeName)
			throws DBException {
		try {
			this.stmt.setNull(parameterName, sqlType, typeName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setObject(String parameterName, Object x) throws DBException {
		try {
			this.stmt.setObject(parameterName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setObject(String parameterName, Object x, int targetSqlType)
			throws DBException {
		try {
			this.stmt.setObject(parameterName, x, targetSqlType);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setObject(String parameterName, Object x, int targetSqlType,
			int scale) throws DBException {
		try {
			this.stmt.setObject(parameterName, x, targetSqlType, scale);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setShort(String parameterName, short x) throws DBException {
		try {
			this.stmt.setShort(parameterName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setString(String parameterName, String x) throws DBException {
		try {
			this.stmt.setString(parameterName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setTime(String parameterName, Time x) throws DBException {
		try {
			this.stmt.setTime(parameterName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setTime(String parameterName, Time x, Calendar cal)
			throws DBException {
		try {
			this.stmt.setTime(parameterName, x, cal);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setTimestamp(String parameterName, Timestamp x)
			throws DBException {
		try {
			this.stmt.setTimestamp(parameterName, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setTimestamp(String parameterName, Timestamp x, Calendar cal)
			throws DBException {
		try {
			this.stmt.setTimestamp(parameterName, x, cal);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setURL(String parameterName, URL val) throws DBException {
		try {
			this.stmt.setURL(parameterName, val);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public boolean wasNull() throws DBException {
		try {
			return this.stmt.wasNull();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void addBatch() throws DBException {
		try {
			this.stmt.addBatch();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void clearParameters() throws DBException {
		try {
			this.stmt.clearParameters();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public boolean execute() throws DBException {
		try {
			return this.stmt.execute();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public CustomResultSet executeQuery() throws DBException {
		try {
			ResultSet rs = this.stmt.executeQuery();
			return new CustomResultSet(rs);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int executeUpdate() throws DBException {
		try {
			return this.stmt.executeUpdate();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public ResultSetMetaData getMetaData() throws DBException {
		try {
			return this.stmt.getMetaData();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public ParameterMetaData getParameterMetaData() throws DBException {
		try {
			return this.stmt.getParameterMetaData();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setArray(int i, Array x) throws DBException {
		try {
			this.stmt.setArray(i, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setAsciiStream(int parameterIndex, InputStream x, int length)
			throws DBException {
		try {
			this.stmt.setAsciiStream(parameterIndex, x, length);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setBigDecimal(int parameterIndex, BigDecimal x)
			throws DBException {
		try {
			this.stmt.setBigDecimal(parameterIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setBinaryStream(int parameterIndex, InputStream x, int length)
			throws DBException {
		try {
			this.stmt.setBinaryStream(parameterIndex, x, length);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setBlob(int i, Blob x) throws DBException {
		try {
			this.stmt.setBlob(i, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setBoolean(int parameterIndex, boolean x) throws DBException {
		try {
			this.stmt.setBoolean(parameterIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setByte(int parameterIndex, byte x) throws DBException {
		try {
			this.stmt.setByte(parameterIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setBytes(int parameterIndex, byte[] x) throws DBException {
		try {
			this.stmt.setBytes(parameterIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setCharacterStream(int parameterIndex, Reader reader, int length)
			throws DBException {
		try {
			this.stmt.setCharacterStream(parameterIndex, reader, length);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setClob(int i, Clob x) throws DBException {
		try {
			this.stmt.setClob(i, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setDate(int parameterIndex, Date x) throws DBException {
		try {
			this.stmt.setDate(parameterIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setDate(int parameterIndex, Date x, Calendar cal)
			throws DBException {
		try {
			this.stmt.setDate(parameterIndex, x, cal);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setDouble(int parameterIndex, double x) throws DBException {
		try {
			this.stmt.setDouble(parameterIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setFloat(int parameterIndex, float x) throws DBException {
		try {
			this.stmt.setFloat(parameterIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setInt(int parameterIndex, int x) throws DBException {
		try {
			this.stmt.setInt(parameterIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setLong(int parameterIndex, long x) throws DBException {
		try {
			this.stmt.setLong(parameterIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setNull(int parameterIndex, int sqlType) throws DBException {
		try {
			this.stmt.setNull(parameterIndex, sqlType);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setNull(int paramIndex, int sqlType, String typeName)
			throws DBException {
		try {
			this.stmt.setNull(paramIndex, sqlType, typeName);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setObject(int parameterIndex, Object x) throws DBException {
		try {
			this.stmt.setObject(parameterIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setObject(int parameterIndex, Object x, int targetSqlType)
			throws DBException {
		try {
			this.stmt.setObject(parameterIndex, x, targetSqlType);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setObject(int parameterIndex, Object x, int targetSqlType,
			int scale) throws DBException {
		try {
			this.stmt.setObject(parameterIndex, x, targetSqlType, scale);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setRef(int i, Ref x) throws DBException {
		try {
			this.stmt.setRef(i, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setShort(int parameterIndex, short x) throws DBException {
		try {
			this.stmt.setShort(parameterIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setString(int parameterIndex, String x) throws DBException {
		try {
			this.stmt.setString(parameterIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setTime(int parameterIndex, Time x) throws DBException {
		try {
			this.stmt.setTime(parameterIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setTime(int parameterIndex, Time x, Calendar cal)
			throws DBException {
		try {
			this.stmt.setTime(parameterIndex, x, cal);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setTimestamp(int parameterIndex, Timestamp x)
			throws DBException {
		try {
			this.stmt.setTimestamp(parameterIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal)
			throws DBException {
		try {
			this.stmt.setTimestamp(parameterIndex, x, cal);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setURL(int parameterIndex, URL x) throws DBException {
		try {
			this.stmt.setURL(parameterIndex, x);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	@SuppressWarnings("deprecation")
	public void setUnicodeStream(int parameterIndex, InputStream x, int length)
			throws DBException {
		try {
			this.stmt.setUnicodeStream(parameterIndex, x, length);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void addBatch(String sql) throws DBException {
		try {
			this.stmt.addBatch(sql);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void cancel() throws DBException {
		try {
			this.stmt.cancel();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void clearBatch() throws DBException {
		try {
			this.stmt.clearBatch();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void clearWarnings() throws DBException {
		try {
			this.stmt.clearWarnings();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void close() throws DBException {
		try {
			this.stmt.close();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean execute(String sql) throws DBException {
		try {
			return this.stmt.execute(sql);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean execute(String sql, int autoGeneratedKeys)
			throws DBException {
		try {
			return this.stmt.execute(sql, autoGeneratedKeys);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean execute(String sql, int[] columnIndexes) throws DBException {
		try {
			return this.stmt.execute(sql, columnIndexes);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean execute(String sql, String[] columnNames)
			throws DBException {
		try {
			return this.stmt.execute(sql, columnNames);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int[] executeBatch() throws DBException {
		try {
			return this.stmt.executeBatch();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public CustomResultSet executeQuery(String sql) throws DBException {
		try {
			ResultSet rs = this.stmt.executeQuery(sql);
			return new CustomResultSet(rs);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int executeUpdate(String sql) throws DBException {
		try {
			return this.stmt.executeUpdate(sql);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int executeUpdate(String sql, int autoGeneratedKeys)
			throws DBException {
		try {
			return this.stmt.executeUpdate(sql, autoGeneratedKeys);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int executeUpdate(String sql, int[] columnIndexes)
			throws DBException {
		try {
			return this.stmt.executeUpdate(sql, columnIndexes);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int executeUpdate(String sql, String[] columnNames)
			throws DBException {
		try {
			return this.stmt.executeUpdate(sql, columnNames);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public Connection getConnection() throws DBException {
		try {
			return this.stmt.getConnection();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getFetchDirection() throws DBException {
		try {
			return this.stmt.getFetchDirection();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getFetchSize() throws DBException {
		try {
			return this.stmt.getFetchSize();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public CustomResultSet getGeneratedKeys() throws DBException {
		try {
			ResultSet rs = this.stmt.getGeneratedKeys();
			return new CustomResultSet(rs);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getMaxFieldSize() throws DBException {
		try {
			return this.stmt.getMaxFieldSize();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getMaxRows() throws DBException {
		try {
			return this.stmt.getMaxRows();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean getMoreResults() throws DBException {
		try {
			return this.stmt.getMoreResults();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public boolean getMoreResults(int current) throws DBException {
		try {
			return this.stmt.getMoreResults(current);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getQueryTimeout() throws DBException {
		try {
			return this.stmt.getQueryTimeout();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public CustomResultSet getResultSet() throws DBException {
		try {
			ResultSet rs = this.stmt.getResultSet();
			return new CustomResultSet(rs);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getResultSetConcurrency() throws DBException {
		try {
			return this.stmt.getResultSetConcurrency();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getResultSetHoldability() throws DBException {
		try {
			return this.stmt.getResultSetHoldability();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getResultSetType() throws DBException {
		try {
			return this.stmt.getResultSetType();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public int getUpdateCount() throws DBException {
		try {
			return this.stmt.getUpdateCount();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public SQLWarning getWarnings() throws DBException {
		try {
			return this.stmt.getWarnings();
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setCursorName(String name) throws DBException {
		try {
			this.stmt.setCursorName(name);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setEscapeProcessing(boolean enable) throws DBException {
		try {
			this.stmt.setEscapeProcessing(enable);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setFetchDirection(int direction) throws DBException {
		try {
			this.stmt.setFetchDirection(direction);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setFetchSize(int rows) throws DBException {
		try {
			this.stmt.setFetchSize(rows);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}

	}

	public void setMaxFieldSize(int max) throws DBException {
		try {
			this.stmt.setMaxFieldSize(max);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setMaxRows(int max) throws DBException {
		try {
			this.stmt.setMaxRows(max);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

	public void setQueryTimeout(int seconds) throws DBException {
		try {
			this.stmt.setQueryTimeout(seconds);
		} catch ( SQLException e ) {
			logger.error("ERROR",e);
			throw new DBException();
		}
	}

}
